<%-- 
    Document   : addWantEstimate
    Created on : Dec 16, 2013, 6:03:54 AM
    Author     : toint - lifeTek
--%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<jsp:include page="/jsp/pages/header.jsp" />
<html:form action="/AddWantEsAction.do">
    <br/>
    <div class="fieldset">
        <div class="legend">
            THÊM MỚI NHU CẦU ĐÁNH GIÁ KHẮC PHỤC HẬU QUẢ TẠM THỜI SAU THIÊN TAI
        </div>
        <br/>
        <table style="width: 100%;">
            <tr>
                <td class="label">
                    Mã nhu cầu
                </td>
                <td class="row">
                    <html:text property="code" styleId="code" style="width: 100%;"/>
                </td>
                <td class="label">
                    Tên nhu cầu<font style="color: red">*</font>
                </td>
                <td class="row">
                    <html:text property="name" styleId="name" style="width: 100%;"/>
                </td>
            </tr>
            <tr>
                <td class="label">
                    Chọn nhu cầu cha
                </td>
                <td class="row">
                    <html:select property="wantId" styleId="wantId" style="width: 100%;">
                        <html:option value="-1">--Chọn--</html:option>
                        <html:optionsCollection name="lstWant" label="name" value="wantId"/>
                    </html:select>
                </td>
                <td class="label">
                </td>
                <td class="row">
                </td>
            </tr>
            <tr>
                <td class="label">
                    Mô tả
                </td>
                <td class="row" colspan="3">
                    <html:textarea property="description" styleId="description" rows="10" style="width:100%; height: 100px;" />
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: center;">
                    <button class="stylish" onclick="return true;" type="submit">
                        <span>Ghi lại</span>
                    </button>
                </td>
            </tr>
        </table>
    </div>
    <html:hidden property="type" style="type" name="WantEstimateForm" />
</html:form>
    <script type="text/javascript" language="javascript">
        function validateForm() {
            var name = $('name');
            if (name == undefined || name.value == '') {
                alert('Tên nhu cầu không được để trống!');
                name.focus();
                return false;
            }
            return true;
        }
    </script>
